UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rUjQOQlRVSrqlQq79+QCKDl42Z8GnPJQCwwxG2/q+X0=' 
WHERE 
  key_id = 'fb58cb9770a4924471bcaccc7552826d7af481d380916bfeb9ae16dfae367f51' 
  AND (
    token = 'rUjQOQlRVSrqlQq79+QCKDl42Z8GnPJQCwwxG2/q+X0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026