UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GS+MimoTyQ0uM7KS1pCuBvreyCJljwBtDs9ZjrmjaBI=' 
WHERE 
  key_id = '8194829c7b69dfa7de89263820ca4867ccc1e199763b030a7d6923e2c0b36d15' 
  AND (
    token = 'GS+MimoTyQ0uM7KS1pCuBvreyCJljwBtDs9ZjrmjaBI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00055