UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'FLFDr3+ZrlwGqYajqftidybkIPDEq9/4aOG5CPFuO6M=' 
WHERE 
  key_id = '2b53c0684e493cdb25197f537da1f5a5b278ebb6b0db17b8174ab125923c40cd' 
  AND (
    token = 'FLFDr3+ZrlwGqYajqftidybkIPDEq9/4aOG5CPFuO6M=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030