UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nb+/q5aWH3oaRp1g5E3uGoi+5vqqnTaCYMymNz49oeE='
WHERE
key_id = '92f2fcb9ff06ee6bb0a5398018b265938cc8f50ba88e17cb535c5fc5ef7c02ca'
AND (
token = 'nb+/q5aWH3oaRp1g5E3uGoi+5vqqnTaCYMymNz49oeE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)