UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XtoqFqCcLMLqq5W1nLAq7fRSFZNFw0ceJ/3h+aM26y0='
WHERE
key_id = '72bcb6b6e4611ea2b61d89c0eee0030b332032a26c498f362b6c2654d6836d41'
AND (
token = 'XtoqFqCcLMLqq5W1nLAq7fRSFZNFw0ceJ/3h+aM26y0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)