UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5Xi1popqeEQzN+GWYIwg+vnytri5vyVnj/SMhSqhJUU='
WHERE
key_id = '67b51f6e2d297f37ef7bc04e1e43b1010e52b6c755e6bf8bc3f054f13950d7c5'
AND (
token = '5Xi1popqeEQzN+GWYIwg+vnytri5vyVnj/SMhSqhJUU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)