UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'RXy9XIQxIROk9RDEXkFbU1UKpzRqQ3RwPzDR5z4EC/0=' 
WHERE 
  key_id = '209fd6215021a5e09da09868ef227d0f698867f92beb9905e3a43f303bf9d5cb' 
  AND (
    token = 'RXy9XIQxIROk9RDEXkFbU1UKpzRqQ3RwPzDR5z4EC/0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027