UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mZ/x5yInwIyTnGp9+PFItU4wd4gG51nx6/NI7In3050='
WHERE
key_id = '28dee7b488c7961cab4db22cbe3a3d20ec4518fd3859bf54df899eb0059c94cc'
AND (
token = 'mZ/x5yInwIyTnGp9+PFItU4wd4gG51nx6/NI7In3050='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)