UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Wn175g6fxZrX4vkLE1mu/L/aGMfH1ia06tGgoYyER3A=' 
WHERE 
  key_id = '030cb152dd0c9a1b2a72ac44090a3f5118c78c6a56c0a9720121a7510428484c' 
  AND (
    token = 'Wn175g6fxZrX4vkLE1mu/L/aGMfH1ia06tGgoYyER3A=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035