UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zxs0TQjGWyIO0R9Is/6rmR3hUHdnohTDo1++aTGS2kg='
WHERE
key_id = 'c98e1e05825d40b5a4407283d07020fa8a052be7a880ab678c6e4befb4280ecb'
AND (
token = 'zxs0TQjGWyIO0R9Is/6rmR3hUHdnohTDo1++aTGS2kg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)