UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/ZCYAPLG+Us8geXN6bNCxIPUg5jlK0zUDNxF+gY7xkQ='
WHERE
key_id = '54b80c4a4fd07bf3d2339a7b73f2916bc8436ff8ec2b130eb37a39846f0f5bf5'
AND (
token = '/ZCYAPLG+Us8geXN6bNCxIPUg5jlK0zUDNxF+gY7xkQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)