UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sukeFxKGEwy5xcDRRmuKQUxJbDyGpWnWqA0jX61FAJQ='
WHERE
key_id = '74d41aaeca9906b0ef5d7474b20edb381f8eabb618a68ad072da50bfab8014f8'
AND (
token = 'sukeFxKGEwy5xcDRRmuKQUxJbDyGpWnWqA0jX61FAJQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)