UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5wpOOToAXMqjXKGoO9xmGAiV08avqq/aM9fSewwQOi4='
WHERE
key_id = '8cf2cb90b072996bfa6b2efa9cfa8fb2a2acbccd5eb6f25b950e8a0ad7b84922'
AND (
token = '5wpOOToAXMqjXKGoO9xmGAiV08avqq/aM9fSewwQOi4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)