UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'xls10CBZ8f/k7iVgbxw0Qzo4HBUTyAgp679fF1LZQdg=' 
WHERE 
  key_id = 'fabdb20bbf329e5a5880acc564466b15b051e2e4dfe4e494096fabfeb2df991a' 
  AND (
    token = 'xls10CBZ8f/k7iVgbxw0Qzo4HBUTyAgp679fF1LZQdg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030