UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rFi5UbYmEJm1h3v4jbblBl9SrBSegbIPug9IXyI0mCI=' 
WHERE 
  key_id = '8efb8518b454a0ab40d0430d46ec8f91c7199aa0bab48440b4be1d4c077ec2dc' 
  AND (
    token = 'rFi5UbYmEJm1h3v4jbblBl9SrBSegbIPug9IXyI0mCI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018