UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Nedoc/sUSwESRJHj1kVY0pNfCISAZQRMbt9/KvsePRg='
WHERE
key_id = '64cf97f16d91a57839900d022ec7624096205284891ad081c80b5cdef6eb85c0'
AND (
token = 'Nedoc/sUSwESRJHj1kVY0pNfCISAZQRMbt9/KvsePRg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)