UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+pst11TCLR8SRaBebUQm5o6gKT5RFFvCRUXPII9uvrI=' 
WHERE 
  key_id = '26760b447fbf27033237f6889cea3259cae88b5aa532abf20f6a91ce074c58c4' 
  AND (
    token = '+pst11TCLR8SRaBebUQm5o6gKT5RFFvCRUXPII9uvrI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024