UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4vf3NfOcOCD/BNw9/xzz9b2BTvukQ5LVVPdqSBMUy74='
WHERE
key_id = 'c9485ad0b1725cc6ef14e8c7e8115fb4274cf05cc3224cb8dd4b0b2e91adff33'
AND (
token = '4vf3NfOcOCD/BNw9/xzz9b2BTvukQ5LVVPdqSBMUy74='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)