UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3F5eoe/hubSYcVd+UU+sYZ4P01/tq/6C2gIus99WIwY=' 
WHERE 
  key_id = '0925402071f66dfae6d56ffa4572e9139ea3bdfc0688c875c7bbcba946bd6cba' 
  AND (
    token = '3F5eoe/hubSYcVd+UU+sYZ4P01/tq/6C2gIus99WIwY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033