UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JLOs6/Jw9ii0mbfmDnvkTCZj92bOB0IF1MIQA5bNaCE='
WHERE
key_id = '27b33cc0965f7934d193389b77daa6c06e7d10f6d5e58c4ca8ecf18b7e6a1737'
AND (
token = 'JLOs6/Jw9ii0mbfmDnvkTCZj92bOB0IF1MIQA5bNaCE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)