UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'HuLa8KuaQZO7WxsGyTxUFChHdL3TX+/EyS9XU+Uex9U=' 
WHERE 
  key_id = 'dc3aa628e00066814b9cc905f4d73e2a7e37c807d588b26cc2cd51de5589a384' 
  AND (
    token = 'HuLa8KuaQZO7WxsGyTxUFChHdL3TX+/EyS9XU+Uex9U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023