UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1nUyBlypc3sOtlybiEo3qyafLleI0R297q/n0fELmBk='
WHERE
key_id = '11348db53b015805d4531caa56e46e60b76479204f54c5306abfc9f6934cb554'
AND (
token = '1nUyBlypc3sOtlybiEo3qyafLleI0R297q/n0fELmBk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)