UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oLqlIX6OiAdSlTD9dj3OcDPEAUU56O6QamUl7SIXw/Q='
WHERE
key_id = '633e9256008e1f7ccc6f5619f6b32398b04e59d819869815bc9b80b7b8f8d9c2'
AND (
token = 'oLqlIX6OiAdSlTD9dj3OcDPEAUU56O6QamUl7SIXw/Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)