UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2xkismNv7yXtE43/4EQHeZ5GNszO6336VnF3tJlhkJA=' 
WHERE 
  key_id = '7551ba7bbfd72fffbc038aa53c8a6e37091be64e17df7b952f6dc7270dfd8522' 
  AND (
    token = '2xkismNv7yXtE43/4EQHeZ5GNszO6336VnF3tJlhkJA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041