UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'fjisZ6vNFqWbwqrutjoSmzDrj8IWqu2tpPH//Yvg0DY=' 
WHERE 
  key_id = '29176b0f2b7961e81a7ff4c88f1ddaaca50178a4eb6441c5f31947e201b5162c' 
  AND (
    token = 'fjisZ6vNFqWbwqrutjoSmzDrj8IWqu2tpPH//Yvg0DY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025