UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xLbdBllT641xVPsZDF4WMmysrohdQAo/LsyLjpEm1OA='
WHERE
key_id = 'd13e03f19501472e1e1efab24fc2f269a98fd53e119402cf1391a06d48cab8b2'
AND (
token = 'xLbdBllT641xVPsZDF4WMmysrohdQAo/LsyLjpEm1OA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)