UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Bex8Sh/BXYNXHyY3RSyNoVOjG2cdj40Vrc9pvz5vBbo='
WHERE
key_id = 'db237d85b51b9079571158e9af4c5ee4505da79ddf8fa1cee4fe7da1ebcea41b'
AND (
token = 'Bex8Sh/BXYNXHyY3RSyNoVOjG2cdj40Vrc9pvz5vBbo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)