UPDATE 
  cscart_june_setuplock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'rZfspGa4/YLVP0XYa0UlBRTxL/hH6nVygU4SML95es4=' 
WHERE 
  key_id = '2af6c2d9d52a2281b525540e0d94ab6742f368ca134348ac796fa5824bdd226a' 
  AND (
    token = 'rZfspGa4/YLVP0XYa0UlBRTxL/hH6nVygU4SML95es4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022