UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'HCbyqE/awRwWl/shvrAFOxkeyY1jDMGsaZlPvsS8fxo=' 
WHERE 
  key_id = '773051d612aaa04764a50a3e1f8662c69e6ed1eaa37d27ffd5cecd897d149e4d' 
  AND (
    token = 'HCbyqE/awRwWl/shvrAFOxkeyY1jDMGsaZlPvsS8fxo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029