UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GIH5hQfkMduR/qlvkPLOftnYt69wGz4DGhUuo1Fa8LM=' 
WHERE 
  key_id = 'cbe18b373b4820cb099d4688ab0853947fa40f6eab137ce9a8c39bba1260f167' 
  AND (
    token = 'GIH5hQfkMduR/qlvkPLOftnYt69wGz4DGhUuo1Fa8LM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048