UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FAngYBj2vhmUL5473JUDFCpIz9byb+ujn+c8uXvJ7MA='
WHERE
key_id = '530d75337c5be4a11d2038287f094a3b1afc75b3e8051bc8522d745fc8be4839'
AND (
token = 'FAngYBj2vhmUL5473JUDFCpIz9byb+ujn+c8uXvJ7MA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)