UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rRdPvB4k54Ph4GqXGtZRbURo/vBkTg1XBtnDDtl/SOY='
WHERE
key_id = '89805c5253d31ad31b36e7cfcc05c7bf90ff6c0e58298dbd706f5b743164b007'
AND (
token = 'rRdPvB4k54Ph4GqXGtZRbURo/vBkTg1XBtnDDtl/SOY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)